package com.mall.concurrency.example.singleton;

/**
 * @Author:zwy
 * @Despriction:
 * @Date:Create in 15:00 2018/5/29
 * @Modify By:
 */
public class SingletonExamle5 {
    private SingletonExamle5(){

    }
    private volatile static SingletonExamle5 instance = null;
    //1f

    public  static SingletonExamle5 getInstance(){

        if(instance == null){
            synchronized (SingletonExamle5.class){
                if(instance == null){

                    instance = new SingletonExamle5();
                }
            }
        }
        return instance;
    }
}
